From 5d40a4d48402306f2723d7f87057007e67ebca4f Mon Sep 17 00:00:00 2001 From: robertl Date: Tue, 16 Feb 2010 02:49:43 +0000 Subject: [PATCH] Add menu option to manually check for update. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@3879 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/gui/mainwindow.cpp | 13 +++++++++++-- gpsbabel/gui/mainwindow.h | 3 ++- gpsbabel/gui/mainwinui.ui | 6 ++++++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/gpsbabel/gui/mainwindow.cpp b/gpsbabel/gui/mainwindow.cpp index 641e67741..83b622e67 100644 --- a/gpsbabel/gui/mainwindow.cpp +++ b/gpsbabel/gui/mainwindow.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -// $Id: mainwindow.cpp,v 1.16 2010-02-15 02:57:00 robertl Exp $ +// $Id: mainwindow.cpp,v 1.17 2010-02-16 02:49:43 robertl Exp $ //------------------------------------------------------------------------ // // Copyright (C) 2009 S. Khai Mong . @@ -132,6 +132,7 @@ MainWindow::MainWindow(QWidget* parent): QMainWindow(parent) connect(ui.actionQuit, SIGNAL(triggered()), this, SLOT(closeActionX())); connect(ui.actionHelp, SIGNAL(triggered()), this, SLOT(helpActionX())); connect(ui.actionAbout, SIGNAL(triggered()), this, SLOT(aboutActionX())); + connect(ui.actionUpgradeCheck, SIGNAL(triggered()), this, SLOT(upgradeCheckActionX())); connect(ui.actionPreferences, SIGNAL(triggered()), this, SLOT(preferencesActionX())); connect(ui.inputFormatCombo, SIGNAL(currentIndexChanged(int)), @@ -172,8 +173,8 @@ MainWindow::MainWindow(QWidget* parent): QMainWindow(parent) //--- Restore from registry restoreSettings(); + upgrade = new UpgradeCheck(parent, formatList); if (bd.startupVersionCheck) { - upgrade = new UpgradeCheck(parent, formatList); upgrade->checkForUpgrade(babelVersion, bd.upgradeCheckMethod, bd.upgradeCheckTime, bd.installationUuid, bd.reportStatistics); @@ -961,6 +962,14 @@ void MainWindow::aboutActionX() aboutDlg.exec(); } +//------------------------------------------------------------------------ +void MainWindow::upgradeCheckActionX() +{ + upgrade->checkForUpgrade(babelVersion, bd.upgradeCheckMethod, + QDateTime(), bd.installationUuid, + bd.reportStatistics); +} + //------------------------------------------------------------------------ void MainWindow::preferencesActionX() { diff --git a/gpsbabel/gui/mainwindow.h b/gpsbabel/gui/mainwindow.h index 5b08313f0..4ea37142d 100644 --- a/gpsbabel/gui/mainwindow.h +++ b/gpsbabel/gui/mainwindow.h @@ -1,5 +1,5 @@ // -*- C++ -*- -// $Id: mainwindow.h,v 1.8 2010-02-14 21:29:06 robertl Exp $ +// $Id: mainwindow.h,v 1.9 2010-02-16 02:49:43 robertl Exp $ //------------------------------------------------------------------------ // // Copyright (C) 2009 S. Khai Mong . @@ -105,6 +105,7 @@ protected: void outputOptionButtonClicked(); void preferencesActionX(); void resetFormatDefaults(); + void upgradeCheckActionX(); }; diff --git a/gpsbabel/gui/mainwinui.ui b/gpsbabel/gui/mainwinui.ui index 62b123243..4f6e108ae 100644 --- a/gpsbabel/gui/mainwinui.ui +++ b/gpsbabel/gui/mainwinui.ui @@ -641,6 +641,7 @@ + @@ -666,6 +667,11 @@ Preferences... + + + Check for Upgrade + + -- 2.30.2